package com.spzx.product.api;

import com.spzx.common.core.constant.ServiceNameConstants;
import com.spzx.common.core.domain.R;
import com.spzx.product.domain.SkuStock;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = ServiceNameConstants.PRODUCT_SERVICE,
        fallbackFactory = RemoteSkuStockFallbackFactory.class)
public interface RemoteSkuStockService {

    @Operation(summary = "内部调用接口：根据skuId查询库存数据")
    @GetMapping("stock/getSkuStock/{skuId}")
    public R<SkuStock> gettSkuStock(@PathVariable("skuId") Long skuId);

}
